package com.ruoyi;

import com.ruoyi.common.utils.StringUtils;

import java.time.LocalDateTime;
import java.time.ZoneOffset;

/**
 * @Title TODO
 * @Description TODO
 * @Author CAI ZHAI
 * @Date 2021/12/19 8:38
 **/
public class StringFormatUtil{
    public static void main(String[] args){
    
        int count = 100000;
    
        long start = LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli();
        for(int i = 0; i<count; i++){
            //String msg = StringUtils.format("请求访问：{}，认证失败{}，无法访问系统资源", "111111111","22222222");
            //String msg1 = "请求访问：{}，认证失败，无法访问系统资源" + "111111111"+"22222222";
            String msg2 = String.format("演员:%s,%s.%s", "周星驰","刘德华","梁朝伟");
        }
        long end = LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli();
        System.out.println(end-start);
    }
}
